<%--
  Created by IntelliJ IDEA.
  User: zkt
  Date: 2023/9/27
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <script src="js/jquery-3.7.1.min.js"></script>
        <script src="js/popper.min.js"></script>
        <script src="js/bootstrap.min.js"></script>

        <title>个人信息</title>

        <script>
            var defaultSex = ${user.getUsersex()};
            if (defaultSex === "男") {
                document.getElementById("boy").checked = true;
            } else if (defaultSex === "女") {
                document.getElementById("girl").checked = true;
            }
        </script>
    </head>
    <body>
        <div class="container">
            <br>
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title">个人信息</h3>
                </div>
                <div class="table-responsive">
                    <form action="modifyMyMessageServlet" method="post">
                        <table class="table">
                            <tr>
                                <td class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
                                    <strong>昵称：</strong>
                                </td>
                                <td>
                                    <input class="form-control" type="text" name="userName" value="${userName}">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>性别：</strong>
                                </td>
                                <td>
                                    <lable class="radio-inline">
                                        <input type="radio" name="usersex" id="boy">男
                                    </lable>
                                    <lable class="radio-inline">
                                        <input type="radio" name="usersex" id="girl">女
                                    </lable>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>年龄：</strong>
                                </td>
                                <td>
                                    <input class="form-control" type="number" name="userAge"
                                           value="${user.getUserage()}">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>地区：</strong>
                                </td>
                                <td>
                                    <input class="form-control" type="text" name="address" value="${user.getAddress()}">
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <strong>个性签名：</strong>
                                    <br><br>
                                    <textarea class="form-control" style="text-indent:2em" name="signature" id="signature" rows="5">
                                        ${user.getSignature()}
                                    </textarea>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <input class="btn btn-success" type="submit" value="保存">
                                    <a class="btn btn-success" href="my.jsp">退出</a>
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>
